﻿using System;
using System.Collections.Generic;
using System.Text;
using JKZP.Model;
using System.Data;
using System.Data.OracleClient;

namespace JKZP.DAL
{
    public class CFZPDAL
    {
        private CFZP ToCustomer(DataRow row)
        {
            CFZP cfzp = new CFZP();
            cfzp.Hphm = (string)row["HPHM"];
            //zpclxx.Zpsj = (string)row["ZPSJ"];
            return cfzp;
        }

        public int Insert(CFZP cfzp)
        {
            int returnValue = 0;
            //to_date(:JGSJ,'yyyy-mm-dd hh24:mi:ss')
            returnValue = SqlHelper.ExecuteNonQuery(@"INSERT INTO zpclxx
                        (HPHM, WFDD, ZPSJ, ZPR,SCBJ)
                 VALUES
                       (:HPHM, :WFDD, :ZPSJ, :ZPR, :SCBJ)",

                new OracleParameter(":HPHM", CFZP.Hphm),
                new OracleParameter(":WFDD", CFZP.Wfdd),
                new OracleParameter(":ZPSJ", CFZP.Zpsj),

                new OracleParameter(":ZPR", CFZP.Zpr),
                new OracleParameter(":SCBJ", CFZP.Scbj));
            return returnValue;

        }


    }
}
